import React from 'react'
import { NavBar } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
// 封装公共的顶部标题组件，合理传递数据，实现顶部标题栏
const NavBarBox = ({title,right}) => {
  const navigate=useNavigate()
  return (
    <div>
      <NavBar right={right} onBack={()=>navigate(-1)}>{title}</NavBar>
      
    </div>
  )
}

export default NavBarBox
